home *** CD-ROM | disk | FTP | other *** search
/ DOpus Plus / DOpus Plus.iso / Tutorial / C Guide / Simple_Module2 / includes / buildin.strings < prev    next >
Text File  |  1998-08-27  |  6KB  |  233 lines

  1. #ifndef BUILDIN_H
  2. #define BUILDIN_H
  3.  
  4.  
  5. /****************************************************************************/
  6.  
  7.  
  8. /* This file was created automatically by CatComp.
  9.  * Do NOT edit by hand!
  10.  */
  11.  
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifdef CATCOMP_ARRAY
  18. #undef CATCOMP_NUMBERS
  19. #undef CATCOMP_STRINGS
  20. #define CATCOMP_NUMBERS
  21. #define CATCOMP_STRINGS
  22. #endif
  23.  
  24. #ifdef CATCOMP_BLOCK
  25. #undef CATCOMP_STRINGS
  26. #define CATCOMP_STRINGS
  27. #endif
  28.  
  29.  
  30. /****************************************************************************/
  31.  
  32.  
  33. #ifdef CATCOMP_NUMBERS
  34.  
  35. #define FUNC0_DESCRIPTION 0
  36. #define FUNC1_DESCRIPTION 1
  37. #define FUNC2_DESCRIPTION 2
  38. #define MSG_ARGUMENTS 3
  39. #define MSG_REVERSED 4
  40. #define MSG_COUNTED 5
  41. #define MSG_ER_TITLE 6
  42. #define MSG_OKAY_BUTTON 7
  43. #define MSG_WINDOW_TITLE 8
  44. #define MSG_CYCLE_GAD 9
  45. #define MSG_OKAY 10
  46. #define MSG_CANCEL 11
  47. #define MSG_CLICK_ME 12
  48. #define MSG_DO_AGAIN 13
  49. #define MSG_NICE_EHH 14
  50. #define MSG_OKAY_DONE 15
  51. #define MSG_CANCEL_DONE 16
  52. #define MSG_PROJECT 17
  53. #define MSG_SAVE 18
  54. #define MSG_QUIT 19
  55. #define MSG_NEXT_MENU 20
  56. #define MSG_ITEM 21
  57.  
  58. #endif /* CATCOMP_NUMBERS */
  59.  
  60.  
  61. /****************************************************************************/
  62.  
  63.  
  64. #ifdef CATCOMP_STRINGS
  65.  
  66. #define FUNC0_DESCRIPTION_STR "A simple requester"
  67. #define FUNC1_DESCRIPTION_STR "Your first window"
  68. #define FUNC2_DESCRIPTION_STR "This you'll never see..."
  69. #define MSG_ARGUMENTS_STR "You have supplied"
  70. #define MSG_REVERSED_STR "In reversed order"
  71. #define MSG_COUNTED_STR "Signs counted"
  72. #define MSG_ER_TITLE_STR "DOpus Example Requester"
  73. #define MSG_OKAY_BUTTON_STR "Go on..."
  74. #define MSG_WINDOW_TITLE_STR "DOpus Example Window"
  75. #define MSG_CYCLE_GAD_STR "Cycle me"
  76. #define MSG_OKAY_STR "Okay"
  77. #define MSG_CANCEL_STR "Cancel"
  78. #define MSG_CLICK_ME_STR "Click me"
  79. #define MSG_DO_AGAIN_STR "Do again"
  80. #define MSG_NICE_EHH_STR "Nice ehh"
  81. #define MSG_OKAY_DONE_STR "Okay button clicked"
  82. #define MSG_CANCEL_DONE_STR "Cancel button clicked"
  83. #define MSG_PROJECT_STR "Project"
  84. #define MSG_SAVE_STR "Save"
  85. #define MSG_QUIT_STR "Quit"
  86. #define MSG_NEXT_MENU_STR "Next Menu"
  87. #define MSG_ITEM_STR "Item"
  88.  
  89. #endif /* CATCOMP_STRINGS */
  90.  
  91.  
  92. /****************************************************************************/
  93.  
  94.  
  95. #ifdef CATCOMP_ARRAY
  96.  
  97. struct CatCompArrayType
  98. {
  99.     LONG   cca_ID;
  100.     STRPTR cca_Str;
  101. };
  102.  
  103. static const struct CatCompArrayType CatCompArray[] =
  104. {
  105.     {FUNC0_DESCRIPTION,(STRPTR)FUNC0_DESCRIPTION_STR},
  106.     {FUNC1_DESCRIPTION,(STRPTR)FUNC1_DESCRIPTION_STR},
  107.     {FUNC2_DESCRIPTION,(STRPTR)FUNC2_DESCRIPTION_STR},
  108.     {MSG_ARGUMENTS,(STRPTR)MSG_ARGUMENTS_STR},
  109.     {MSG_REVERSED,(STRPTR)MSG_REVERSED_STR},
  110.     {MSG_COUNTED,(STRPTR)MSG_COUNTED_STR},
  111.     {MSG_ER_TITLE,(STRPTR)MSG_ER_TITLE_STR},
  112.     {MSG_OKAY_BUTTON,(STRPTR)MSG_OKAY_BUTTON_STR},
  113.     {MSG_WINDOW_TITLE,(STRPTR)MSG_WINDOW_TITLE_STR},
  114.     {MSG_CYCLE_GAD,(STRPTR)MSG_CYCLE_GAD_STR},
  115.     {MSG_OKAY,(STRPTR)MSG_OKAY_STR},
  116.     {MSG_CANCEL,(STRPTR)MSG_CANCEL_STR},
  117.     {MSG_CLICK_ME,(STRPTR)MSG_CLICK_ME_STR},
  118.     {MSG_DO_AGAIN,(STRPTR)MSG_DO_AGAIN_STR},
  119.     {MSG_NICE_EHH,(STRPTR)MSG_NICE_EHH_STR},
  120.     {MSG_OKAY_DONE,(STRPTR)MSG_OKAY_DONE_STR},
  121.     {MSG_CANCEL_DONE,(STRPTR)MSG_CANCEL_DONE_STR},
  122.     {MSG_PROJECT,(STRPTR)MSG_PROJECT_STR},
  123.     {MSG_SAVE,(STRPTR)MSG_SAVE_STR},
  124.     {MSG_QUIT,(STRPTR)MSG_QUIT_STR},
  125.     {MSG_NEXT_MENU,(STRPTR)MSG_NEXT_MENU_STR},
  126.     {MSG_ITEM,(STRPTR)MSG_ITEM_STR},
  127. };
  128.  
  129. #endif /* CATCOMP_ARRAY */
  130.  
  131.  
  132. /****************************************************************************/
  133.  
  134.  
  135. #ifdef CATCOMP_BLOCK
  136.  
  137. static const char CatCompBlock[] =
  138. {
  139.     "\x00\x00\x00\x00\x00\x14"
  140.     FUNC0_DESCRIPTION_STR "\x00\x00"
  141.     "\x00\x00\x00\x01\x00\x12"
  142.     FUNC1_DESCRIPTION_STR "\x00"
  143.     "\x00\x00\x00\x02\x00\x1A"
  144.     FUNC2_DESCRIPTION_STR "\x00\x00"
  145.     "\x00\x00\x00\x03\x00\x12"
  146.     MSG_ARGUMENTS_STR "\x00"
  147.     "\x00\x00\x00\x04\x00\x12"
  148.     MSG_REVERSED_STR "\x00"
  149.     "\x00\x00\x00\x05\x00\x0E"
  150.     MSG_COUNTED_STR "\x00"
  151.     "\x00\x00\x00\x06\x00\x18"
  152.     MSG_ER_TITLE_STR "\x00"
  153.     "\x00\x00\x00\x07\x00\x0A"
  154.     MSG_OKAY_BUTTON_STR "\x00\x00"
  155.     "\x00\x00\x00\x08\x00\x16"
  156.     MSG_WINDOW_TITLE_STR "\x00\x00"
  157.     "\x00\x00\x00\x09\x00\x0A"
  158.     MSG_CYCLE_GAD_STR "\x00\x00"
  159.     "\x00\x00\x00\x0A\x00\x06"
  160.     MSG_OKAY_STR "\x00\x00"
  161.     "\x00\x00\x00\x0B\x00\x08"
  162.     MSG_CANCEL_STR "\x00\x00"
  163.     "\x00\x00\x00\x0C\x00\x0A"
  164.     MSG_CLICK_ME_STR "\x00\x00"
  165.     "\x00\x00\x00\x0D\x00\x0A"
  166.     MSG_DO_AGAIN_STR "\x00\x00"
  167.     "\x00\x00\x00\x0E\x00\x0A"
  168.     MSG_NICE_EHH_STR "\x00\x00"
  169.     "\x00\x00\x00\x0F\x00\x14"
  170.     MSG_OKAY_DONE_STR "\x00"
  171.     "\x00\x00\x00\x10\x00\x16"
  172.     MSG_CANCEL_DONE_STR "\x00"
  173.     "\x00\x00\x00\x11\x00\x08"
  174.     MSG_PROJECT_STR "\x00"
  175.     "\x00\x00\x00\x12\x00\x06"
  176.     MSG_SAVE_STR "\x00\x00"
  177.     "\x00\x00\x00\x13\x00\x06"
  178.     MSG_QUIT_STR "\x00\x00"
  179.     "\x00\x00\x00\x14\x00\x0A"
  180.     MSG_NEXT_MENU_STR "\x00"
  181.     "\x00\x00\x00\x15\x00\x06"
  182.     MSG_ITEM_STR "\x00\x00"
  183. };
  184.  
  185. #endif /* CATCOMP_BLOCK */
  186.  
  187.  
  188. /****************************************************************************/
  189.  
  190.  
  191. struct LocaleInfo
  192. {
  193.     APTR li_LocaleBase;
  194.     APTR li_Catalog;
  195. };
  196.  
  197.  
  198. #ifdef CATCOMP_CODE
  199.  
  200. STRPTR GetString(struct LocaleInfo *li, LONG stringNum)
  201. {
  202. LONG   *l;
  203. UWORD  *w;
  204. STRPTR  builtIn;
  205.  
  206.     l = (LONG *)CatCompBlock;
  207.  
  208.     while (*l != stringNum)
  209.     {
  210.         w = (UWORD *)((ULONG)l + 4);
  211.         l = (LONG *)((ULONG)l + (ULONG)*w + 6);
  212.     }
  213.     builtIn = (STRPTR)((ULONG)l + 6);
  214.  
  215. #undef LocaleBase
  216. #define LocaleBase li->li_LocaleBase
  217.     
  218.     if (LocaleBase)
  219.         return(GetCatalogStr(li->li_Catalog,stringNum,builtIn));
  220. #undef LocaleBase
  221.  
  222.     return(builtIn);
  223. }
  224.  
  225.  
  226. #endif /* CATCOMP_CODE */
  227.  
  228.  
  229. /****************************************************************************/
  230.  
  231.  
  232. #endif /* BUILDIN_H */
  233.